package com.andy.note.main.model.proxy;

import java.lang.reflect.Proxy;

public class DyTest {
	public static void main(String[] args) {
		UserInfo userImpl =new UserImpl();
		UserHandler handler = new UserHandler(userImpl);
		UserInfo userProxy = (UserInfo)Proxy.newProxyInstance
				(ClassLoader.getSystemClassLoader(),
						new Class[]{UserInfo.class}, handler);
		userProxy.queryUser();
	}
}